﻿using UnityEngine;

namespace DL.Combat.Base.Data
{
    /// <summary>
    /// 战斗数据类
    /// </summary>
    [CreateAssetMenu(menuName = "GameData/Assets/Combat/ComboActionConfigSO",fileName = "New ComboActionConfigSO",order = 0)]
    public class ComboActionConfigSO : ScriptableObject
    {
        [SerializeField, Header("组合技能")] public CombatActionSO backComboAction;
        [SerializeField, Header("组合技")] public CombatActionSO lightComboAction;
        [SerializeField, Header("组合技")] public CombatActionSO heavyComboAction;
        
        //目标检测
        [SerializeField, Header("敌人检测范围")] public float detectionRang;
        [SerializeField, Header("敌人Box检测范围")] public Vector3 detectionBoxRang = default;
        [SerializeField, Header("敌人层级")] public LayerMask enemiesLayer;


        public void InitComboConfig()
        {
            if (backComboAction != null) backComboAction.Init();
            if (heavyComboAction != null) heavyComboAction.Init();
            if (lightComboAction != null) lightComboAction.Init();
        }
    }
}